package br.com.Word.View;

import br.com.Word.Logica.PiscarLabel;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import static java.awt.Frame.MAXIMIZED_BOTH;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyChangeListener;
import java.util.TimerTask;
import javax.swing.Action;
import javax.swing.Timer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author alexandre
 */
public class JPInterface2 extends javax.swing.JPanel {

    /**
     * Creates new form NewJPanel2
     */
    public JPInterface2() {
        initComponents();
        jLCabeçario.setText("<html>Na esquerda temos a Barra de acesso rápido,"
                + "que permite acessar alguns comandos mais rapidamente como salvar,desfazer."
                + " Você pode personalizar essa barra, clicando no menu de contexto "
                + "(flecha para baixo) à direita dela.”.</html>");
        Piscar();

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        voltar = new javax.swing.JLabel();
        jLavancar = new javax.swing.JLabel();
        jLMinimizar = new javax.swing.JLabel();
        jLCabeçario = new javax.swing.JLabel();
        jLDialog = new javax.swing.JLabel();
        jLFechar = new javax.swing.JLabel();
        jLTelaWord = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 255, 0));
        setMaximumSize(new java.awt.Dimension(543, 360));
        setMinimumSize(new java.awt.Dimension(543, 360));
        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        voltar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/Word/imagen/direction_left.png"))); // NOI18N
        add(voltar, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 500, -1, -1));

        jLavancar.setForeground(new java.awt.Color(255, 0, 0));
        jLavancar.setText("Clique aqui  para continuar");
        add(jLavancar, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 260, -1, -1));

        jLMinimizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/Word/imagen/Minimizar.png"))); // NOI18N
        jLMinimizar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLMinimizarMouseClicked(evt);
            }
        });
        add(jLMinimizar, new org.netbeans.lib.awtextra.AbsoluteConstraints(960, 0, -1, -1));

        jLCabeçario.setFont(new java.awt.Font("Batang", 3, 12)); // NOI18N
        jLCabeçario.setForeground(new java.awt.Color(255, 51, 51));
        add(jLCabeçario, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 170, 330, 90));

        jLDialog.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 0, 0), 3, true));
        add(jLDialog, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 90, 20));

        jLFechar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/Word/imagen/Fechar.png"))); // NOI18N
        add(jLFechar, new org.netbeans.lib.awtextra.AbsoluteConstraints(990, 0, -1, -1));

        jLTelaWord.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/Word/imagen/Tela 1024.png"))); // NOI18N
        add(jLTelaWord, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -80, -1, 760));
    }// </editor-fold>//GEN-END:initComponents

    private void jLMinimizarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLMinimizarMouseClicked
        // TODO add your handling code here:

    }//GEN-LAST:event_jLMinimizarMouseClicked


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLCabeçario;
    private javax.swing.JLabel jLDialog;
    public javax.swing.JLabel jLFechar;
    public javax.swing.JLabel jLMinimizar;
    private javax.swing.JLabel jLTelaWord;
    public javax.swing.JLabel jLavancar;
    public javax.swing.JLabel voltar;
    // End of variables declaration//GEN-END:variables

    public void Piscar() {
        Timer t = new Timer(300, new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent ae) {
                if (jLDialog.isVisible() == true) {
                    jLDialog.setVisible(false);
                    jLDialog.setBackground(Color.RED); //Muda a cor do fundo  
                    jLDialog.setForeground(Color.RED); //Mudar a cor do texto
                } else {

                    jLDialog.setVisible(true);

                }

            }

        });
        t.start();
    }
}
